﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.components.secretary.states {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.utils.timeline.*;
    import net.wooga.pets.views.components.secretary.*;
    import flash.errors.*;

    public class ReceptionSecretaryBaseState {

        private var _contextManager:ReceptionSecretaryViewStateManager;
        private var _sequenceTimeline:SequenceBasedStatesTimeline;

        public function ReceptionSecretaryBaseState(_arg1:ReceptionSecretaryViewStateManager, _arg2:SequenceBasedStatesTimeline){
            this._contextManager = _arg1;
            this._sequenceTimeline = _arg2;
            this._sequenceTimeline.addEventListener(Event.COMPLETE, this.onSequenceComplete);
        }
        private function onSequenceComplete(_arg1:InfoEvent):void{
            if (this.getStateLabel() == _arg1.info.sequence_label){
                this.onTimelineAnimationFinished(_arg1.info.sequence_label);
            };
        }
        protected function get context():ReceptionSecretaryViewStateManager{
            return (this._contextManager);
        }
        protected function playFromLabel(_arg1:String):void{
            this._sequenceTimeline.playFromFrameLabel(_arg1);
        }
        protected function interrupt():void{
            this._sequenceTimeline.interrupt();
        }
        protected function onTimelineAnimationFinished(_arg1:String):void{
            throw (new IllegalOperationError("This is a base class, overwrite this method"));
        }
        protected function getStateLabel():String{
            throw (new IllegalOperationError("This is a base class, overwrite this method and provide a state label to returned"));
        }
        protected function gotoAndStop(_arg1):void{
            this._sequenceTimeline.gotoAndStop(_arg1);
        }
        public function destroy():void{
            this._sequenceTimeline.removeEventListener(Event.COMPLETE, this.onSequenceComplete);
        }

    }
}//package net.wooga.pets.views.components.secretary.states 
